﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using BDD.TicTacToe.Domain;
using BDD.TicTacToe.Repository;
using StructureMap;
using StructureMap.Configuration.DSL;

namespace BDD.TicTacToe.Ui.Mvc
{
    public class BootStrapper
    {
        public static void ConfigureDependencies()
        {
            ObjectFactory.Initialize(x =>
            {
                x.AddRegistry<ControllerRegistry>();

            });
        }

        public class ControllerRegistry : Registry
        {

            public ControllerRegistry()
            {
                For<IGameRepository>().Use<GameRepository>();               
            }

        }
    }
}